<template>
	<view>
		<!-- 导航1 -->
		<view class="">
			<!-- 176-20 -->
			<app-navigation-icon navHeight="156" iconRadius="16rpx" navMargin="20rpx auto" :navs="navs"
				background="#f7f7f7" :scroll="true" columns="5" :rows="2">
			</app-navigation-icon>
		</view>
		<view class="imgsox" v-for="(item,index) in imags" :key="index">
			<app-jump-button form :url="item.url">
				<image class="imagexs" :src="item.icon_url" mode="widthFix"></image>
			</app-jump-button>
			<!-- <image class="imagexs" :src="item.icon_url" mode="widthFix"></image> -->
		</view>
	</view>
</template>

<script>
	import appNavigationIcon from '../../../components/page-component/app-navigation-icon/app-navigation-icon.vue'

	export default {
		data() {
			return {
				navs: [ //
					{
						id: 1,
						name: "挣钱多",
						open_type: "reLaunch",
						url: "/pages/user-center/user-center",
						icon_url: "https://wechat.shuangxitang.cn/web/uploads/mall1/202107/20210730/c56b23475b719f1c70eea14b0430a8da.jpg",
					},
					{
						id: 2,
						name: "转让店",
						open_type: "navigate",
						url: "/pages/store/transtore/transtore",
						icon_url: "https://wechat.shuangxitang.cn/web/uploads/mall1/202107/20210730/c56b23475b719f1c70eea14b0430a8da.jpg",
					},
					{
						id: 3,
						name: "挣钱多",
						open_type: "reLaunch",
						url: "/pages/user-center/user-center",
						icon_url: "https://wechat.shuangxitang.cn/web/uploads/mall1/202107/20210730/c56b23475b719f1c70eea14b0430a8da.jpg",
					},
					{
						id: 4,
						name: "挣钱多",
						open_type: "reLaunch",
						url: "/pages/user-center/user-center",
						icon_url: "https://wechat.shuangxitang.cn/web/uploads/mall1/202107/20210730/c56b23475b719f1c70eea14b0430a8da.jpg",
					},
					{
						id: 5,
						name: "金币换珠宝",
						open_type: "navigate",
						url: "/plugins/jinbi_mall/index/index",
						icon_url: "https://wechat.shuangxitang.cn/web/uploads/mall1/202107/20210730/c56b23475b719f1c70eea14b0430a8da.jpg",
					}
				],
				page: 1,
				limit: 20,
				page_count: 1,
				imags: []
			}
		},
		onLoad() {
			this.allReq(2180)
			this.allReq(2181)
			uni.showShareMenu({
				withShareTicket: true,
				menus: ['shareAppMessage', 'shareTimeline']
			})
		},
		onShow() {

		},
		onShareAppMessage() {
			return this.$shareAppMessage({
				title: '',
				params: {

				}
			});
		},
		onShareTimeline() {
			return this.$shareTimeline({
				title: '',
				query: {

				}
			});
		},
		components: {
			appNavigationIcon
		},
		methods: {
			jump(item) {
				uni.navigateTo({
					url: item
				})
			},
			allReq(pid) {
				this.$request({
					url: this.$api.navs.list,
					data: {
						pid: pid,
						status: 1
					}
				}).then((res) => {
					if (pid == 2180) {
						this.navs = res.data.list
					} else if (pid == 2181) {
						this.imags = res.data.list
					}
				}).catch(() => {

				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.bigtu {
		width: 100%;
		height: 450rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.imgsox {
		width: 100%;

		.imagexs {
			width: 100%;
		}
	}
</style>
